<template>
	<div class="bigDiv">
<!-- 		<el-form :inline="true" label-width="120px">
			<el-form-item label="查询时间" prop="time">
				<el-date-picker v-model="timeModel" type="daterange" range-separator="至" start-placeholder="开始日期"
					end-placeholder="结束日期" value-format="yyyy-MM-dd hh:mm:ss">
				</el-date-picker>
			</el-form-item>

			<el-form-item label="订单状态">
				<el-select size="small" v-model="queryParams.orderState" multiple placeholder="请选择订单状态" filterable
					clearable>
					<el-option v-for="item in orderStateList" :key="item.id" :label="item.label" :value="item.value"
						@change="changeClass">
					</el-option>
				</el-select>
			</el-form-item>

			<el-form-item>
				<el-button type="primary" icon="el-icon-search" size="small" @click="getList">搜索</el-button>
				<el-button type="primary" size="small" @click="importHandle">导出excel</el-button>
			</el-form-item>
			<el-form-item>
				<div style="font-size: 12px;color:	#AAAAAA">注：根据重新请在订单状态中选择</div>
			</el-form-item>
		</el-form> -->
		<div style="margin: 10px auto 30px 40px;font-size: 30px;color: #004c70;font-weight: bold;">
			各商品分类及商品来源销售情况(有效订单不含预占/元)
		</div>
		<el-table :data="list" border :cell-style="setRowStyle" :header-cell-style="{background:'#daf3ff',height:'70px',color:'#000000',border: '0.3px solid #afe1e1'}" height="calc(100vh - 230px)">
			<el-table-column label="周期" align="center" prop="本年" margin: auto></el-table-column>
			<el-table-column label="pscs订单" align="center" prop="pscs订单" margin: auto></el-table-column>
			<el-table-column label="电商供应商" align="center" prop="数据中心" margin: auto></el-table-column>
			<el-table-column label="扶贫" align="center" prop="扶贫" margin: auto></el-table-column>
			<el-table-column label="子企业" align="center" prop="子企业" margin: auto></el-table-column>
			<el-table-column label="集采协同" align="center" prop="集采协同" margin: auto></el-table-column>
			<el-table-column label="本地供应商" align="center" prop="本地供应商" margin: auto></el-table-column>
			<el-table-column label="优选直采" align="center" prop="优采自营" margin: auto></el-table-column>
			<el-table-column label="智能柜" align="center" prop="智能柜" margin: auto></el-table-column>
		</el-table>
		
		<!-- <pagination v-show="total > 0" :total="total" @pagination="getList" /> -->
	</div>
</template>

<script>
	import {
		getGoodsSourceCount1
	} from "@/api/leader/leaderapi";
	export default {
		name: "",
		// 页面数据
		data() {
			return {
				list: [],
				total: 0, // 一共多少条数据
				timeModel: []
			};
		},
		// 初始化
		mounted() {
			this.getDate();
			console.log('60',this.list);
		},
		// 函数集合
		methods: {
			getDate() {
				//本年商品类别销售金额
				getGoodsSourceCount1().then(res => {
					this.list = res
					console.log('67',this.list);
					})   
			},
			setRowStyle({row, column, rowIndex, columnIndex}) {
			   if(columnIndex == 0){
			       return 'background: #f4ffff' 
			   }
			}

		}
	}
</script>

<style>
	::v-deep.el-table td {
	  border: 1px solid black;
	  border-right: none !important;
	}
</style>
